/*
 * This file (AxLogEvent.java) is protected by the GNU GPL licence (v2). 
 * Please read the license.txt attached for further informations. 
 * 
 */

package artx.events;

/**
 * Event sent when a message is logged.
 * 
 * @author Xavier Gouchet
 * 
 */
public class AxLogEvent {

	/** The message content */
	private String message;

	/** The message verbosity level */
	private int level;

	/**
	 * Standard constructor.
	 * 
	 * @param lvl
	 *            the message content
	 * @param msg
	 *            the message verbosity level
	 */
	public AxLogEvent(int lvl, String msg) {
		if (msg != null) {
			this.message = new String(msg);
		} else {
			this.message = "";
		}
		this.level = (int) lvl;
	}

	/**
	 * 
	 * @return the message level
	 */
	public int GetLevel() {
		return (int) this.level;
	}

	/**
	 * 
	 * @return the message content
	 */
	public String GetMessage() {
		return new String(this.message);
	}
}
